package com.quan.mall.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;


import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import javax.validation.constraints.NotNull;
import com.quan.commons.core.bean.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 财务-会员钱包
 *
 * @author yhaoquan
 * @email yhaoquan@163.com
 * @date 2021-03-26 15:19:14
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("fms_member_wallet")
public class FmsMemberWallet extends BaseEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * ID
	 */
    @TableId
    private Long id;

	/**
	 * OPENID
	 */
    @NotNull(message = "OPENID不能为空")
    private String openid;

	/**
	 * 会员ID
	 */
    @NotNull(message = "会员ID不能为空")
    private Long memberId;

	/**
	 * 会员名称
	 */
    @NotNull(message = "会员名称不能为空")
    private String name;

	/**
	 * 会员手机号
	 */
    @NotNull(message = "会员手机号不能为空")
    private String phone;

	/**
	 * 账户余额（已入账金额）
	 */
    @NotNull(message = "会员钱包金额不能为空")
    private BigDecimal amount;

	/**
	 * 创建时间
	 */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime ctime;


}
